﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using Hxsoft.AppV1.Module;

namespace Hxsoft.AppV1.Admin.LinkClassManage.Controls
{
	public partial class ModifyLinkClass : BaseUserControl
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			this.DataBind();
		}

		/// <summary>
		/// 属性 ClassName
		/// </summary>
		public string ClassName
		{
			get
			{
				return Convert.ToString(CtrlClassName.Text);
			}
			set
			{
				CtrlClassName.Text = value.ToString();
			}
		}

		/// <summary>
		/// 属性 Memo
		/// </summary>
		public string Memo
		{
			get
			{
				if (String.IsNullOrEmpty(CtrlMemo.Text))
					return null;

				return Convert.ToString(CtrlMemo.Text);
			}
			set
			{
				if (value == null)
					CtrlMemo.Text = "";
				else
					CtrlMemo.Text = value.ToString();
			}
		}


		/// <summary>
		/// 控件的 LinkClassInfo 实例。
		/// </summary>
		public Hxsoft.AppV1.Module.LinkClass Info
		{
			get
			{
				Hxsoft.AppV1.Module.LinkClass linkClass = new Hxsoft.AppV1.Module.LinkClass();

				linkClass.ClassName = ClassName;
				linkClass.Memo = Memo;

				return linkClass;
			}
			set
			{
				if (value == null) return;

				ClassName = value.ClassName;
				Memo = value.Memo;
			}
		}
	}
}